<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:s="http://jboss.com/products/seam/taglib">
<head>
<title>Insert title here</title>
</head>
<body>
<f:view contentType="text/html">
<s:remote include="seamMgr"/>
  
  <script type="text/javascript">
    //<![CDATA[
    
    function sayHello() {
      var name = prompt("What is your name?");
      Seam.Component.getInstance("seamMgr").getUser(name, sayHelloCallback);
    }

    function sayHelloCallback(result) {
      alert(result.name);
    }

    // ]]>
  </script>  

<button onclick="javascript:sayHello()">Say Hello</button>
<h:inputText value="hello,world..."></h:inputText>
</f:view>
</body>
</html>